<?php echo $this->Html->script(array('users.view','actions'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>
<?php echo $this->Html->css(array('users.view','provider.index.images','form','actions'),null,array('inline'=>false));?>

<div id="left-panel">
	<div id="logo"><?php echo $this->Html->link($this->Html->image('logo.png'),'/',array('escape'=>false,'alt'=>'strzyzowianin.pl'))?></div>

	<ul>
		<?php echo $this->element('menu-main')?>
	</ul>
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('User.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('User.id'))); ?></li>
		<li><?php echo $this->Html->link(__('List Users', true), array('action' => 'index'));?></li>

		<li><?php echo $this->Html->link(__('New User', true), array('action' => 'add_user')); ?> </li>
		<li><?php echo $this->Html->link(__('List Yacht Charters', true), array('controller' => 'yacht_charters', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Yacht Charter', true), array('controller' => 'yacht_charters', 'action' => 'add')); ?> </li>
	</ul>
			
</div>
<div id="right-panel">
		<h2><?php echo __('Twoje dane')?></h2>
		<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
			<tr>
				<td align="left" valign="top" style="padding-top:0px; margin: 0px;" width="50%">
					<?php echo $this->Form->create('User',array('url'=>array('plugin'=>false,'controller'=>'users','action'=>'view',$this->data['User']['id'])));?>
					<div id="tabs">
						<ul>	
							<li><a href="#tabs-0">Account</a></li>
							<li><a href="#tabs-1">Change Billing Details</a></li>
							<li><a href="#tabs-2">Change Delivery Details</a></li>
							<li><a href="#tabs-3">Change Password</a></li>
							<li><a href="#tabs-4">Change Email</a></li>
						</ul>
						<div id="tabs-0">
							<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
								<tr>
									<td><?php echo __('Name',true)?></td><td><?php echo $this->data['User']['first_name']?> <?php echo $this->data['User']['last_name']?></td>
								</tr>
							</table>						
						</div>
						<div id="tabs-1">
							<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
								<tr>
									<td align="left" valign="top" style="padding-top:0px; margin: 0px;">
										<fieldset>
										<legend><h3><?php __("Your Billing details below"); ?></h3></legend>
										<?php
											echo $this->Form->hidden('id');
											echo $this->Form->input('first_name',array('label'=>__("First Name",true)));
											echo $this->Form->input('last_name',array('label'=>__("Last Name",true)));
											echo $this->Form->input('address1',array('label'=>__("Address",true)));
											echo $this->Form->input('address2',array('label'=>__("Address",true)));
											echo $this->Form->input('address3',array('label'=>__("City",true)));
											echo $this->Form->input('address4',array('label'=>__("Zip Code",true)));
											//echo $this->Form->input('address5',array('label'=>__("Country",true),'options'=>$countrycod));
											echo $this->Form->input('email',array('label'=>__("E-mail",true),'readonly'=>true));
										?>
										</fieldset>
									</td>
								</tr>
							</table>
							<?php echo $this->Form->submit('Submit')?>
						</div>
						<div id="tabs-2">
							<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
								<tr>
									<td align="left" valign="top" style="padding-top:0px; margin: 0px;">										
										<fieldset>
									 		<legend><h3><?php __('Your Delivery details below'); ?></h3></legend>
									 		<div class="input text required">
												<label for="CustomerDeliveryAsBilling"><?php echo __("Same as Billing Details?",true);?></label>
												<?php 
												echo $this->Form->checkbox('delivery_as_billing',array('hiddenField' => false)); 
												$this->Js->get('#CustomerDeliveryAsBilling');
												$this->Js->event( 'change', 'copyDelivery($("#CustomerDeliveryAsBilling").attr("checked"));' ,true);
												?>	
											</div>
										<?php									
											echo $this->Form->input('delivery_first_name',array('label'=>__("First Name",true),'class'=>'delivery_files'));
											echo $this->Form->input('delivery_last_name',array('label'=>__("Surname",true),'class'=>'delivery_files'));
											echo $this->Form->input('delivery_address1',array('label'=>__("Address",true),'class'=>'delivery_files'));
											echo $this->Form->input('delivery_address2',array('label'=>__("Address",true),'class'=>'delivery_files'));
											echo $this->Form->input('delivery_address3',array('label'=>__("City",true),'class'=>'delivery_files'));
											echo $this->Form->input('delivery_address4',array('label'=>__("Zip Code",true),'class'=>'delivery_files'));
// 											echo $this->Form->input('delivery_address5',array('label'=>__("Country",true),'class'=>'delivery_files','options'=>$countrycod));
										?>
										</fieldset>
									</td>
								</tr>
							</table>
							<?php echo $this->Form->submit('Submit')?>
						</div>
						<div id="tabs-3">
									<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
										<tr>
											<td align="left" valign="top" style="padding-top:0px; margin: 0px;">
												<fieldset>
												<legend><h3><?php __("Change Your Password below"); ?></h3></legend>
												<p>If you would like to change your password please enter your existing password, then your new password and submit your request.</p>
												<?php													
													echo $this->Form->input('old_password',array('label'=>__("Please enter your current password",true),'type'=>'password'));
													echo $this->Form->input('new_password',array('label'=>__("Please enter a new password",true),'type'=>'password'));
												?>
												</fieldset>
											</td>
						
										</tr>
									</table>
									<?php echo $this->Form->submit('Submit')?>
						</div>
						<div id="tabs-4">
									<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
										<tr>
											<td align="left" valign="top" style="padding-top:0px; margin: 0px;">
												<fieldset>
												<legend><h3><?php __("Change Your Email below"); ?></h3></legend>
												<p>If you would like to change your e-mail please enter your current password, then your new email and submit your request.</p>
												<?php													
													echo $this->Form->input('email_password',array('label'=>__("Please enter your current password",true),'type'=>'password'));
													echo $this->Form->input('new_email',array('label'=>__("Please enter a new email",true)));
												?>
												</fieldset>
											</td>
						
										</tr>
									</table>
									<?php echo $this->Form->submit('Submit')?>
						</div>
					</div>
					<?php echo $this->Form->end();?>
				</td>
			</tr>
		</table>
</div>

